local unitName  =  "armbrtha"

local unitDef  =  {
--Internal settings
    buildpic = "ARMBRTHA.DDS",
    Category = "UNKILLABLE",
    ObjectName = "armbrtha.3do",
    name = "Big Bertha",
    Side = "TANKS",
    UnitName = "armbrtha",
    script = "armbrtha.cob",
    
--Unit limitations and properties
    BuildTime = 1000,
    Description = "Strategical unit",
    MaxDamage = 800,
    SightDistance = 300,
	yardmap = "oooooooooooooooo",
	buildangle = 32700,
	usebuildinggrounddecal = true,	
	buildinggrounddecaldecayspeed = 30,
	buildinggrounddecalsizex = 6,
	buildinggrounddecalsizey = 6,
	buildinggrounddecaltype = "armbrtha_aoplane.dds",	

--Energy and metal related
    BuildCostEnergy = 0,
    BuildCostMetal = 0,
	energymake = 0,
	energyuse = 0,
	
    
--Pathfinding and related
    Acceleration = 0,
    BrakeRate = 0,
    FootprintX = 4,
    FootprintZ = 4,
    MaxSlope = 12,
    MaxWaterDepth = 0,
    
--Abilities
    Builder = 0,
    CanAttack = 1,
    CanGuard = 0,
    CanMove = 0,
    CanPatrol = 0,
    CanStop = 0,
    LeaveTracks = 0,
    Reclaimable = 0,
	canSelfDestruct  = 0,	

--Custom parameters
	customparams = {
		isobjective = "true",
		indestructible = "true",
	},
    
--Custom parameters
	customparams = {
		isobjective = "true",
		indestructible = "true",
	},

	sfxtypes = {
		explosiongenerators = {
			[1] = "custom:berthaflare",
		},
	},
	sounds = {
		canceldestruct = "cancel2",
		underattack = "warning1",
		cant = {
			[1] = "cantdo4",
		},
		count = {
			[1] = "count6",
			[2] = "count5",
			[3] = "count4",
			[4] = "count3",
			[5] = "count2",
			[6] = "count1",
		},
		ok = {
			[1] = "servlrg3",
		},
		select = {
			[1] = "servlrg3",
		},
	},

--Weapons and related
    ExplodeAs = "TANKDEATH",

	weapons = {
		[1] = {
			def = "arm_berthacannon",
			BadTargetCategory = "UNKILLABLE",
			NoChaseCategory = "UNKILLABLE",
			OnlyTargetCategory = "KILLABLE",			
		},
	},
}

local weaponDefs = {
		arm_berthacannon = {
			accuracy = 300,
			areaofeffect = 192,
			craterboost = 0.25,
			cratermult = 0.25,
			energypershot = 0,
			explosiongenerator = "custom:FLASHBIGBUILDING",
			gravityaffected = "true",
			heightboostfactor = 10,
			impulseboost = 0.0,
			impulsefactor = 0.0,
			leadbonus = 0,
			name = "BerthaCannon",
			noselfdamage = true,
			range = 4000,
			reloadtime = 11,
			soundhit = "xplonuk1",
			soundstart = "xplonuk4",
			turret = true,
			weapontype = "Cannon",
			weaponvelocity = 1100,
			damage = {
				default = 1625,
				unkillable = 0,
			},
		},
	}

unitDef.weaponDefs = weaponDefs

return lowerkeys({ [unitName]  =  unitDef })